package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.OrganizationalStructureActivity;
import com.wwtech.epp.ui.activity.friend.contract.OrganizationalStructureContract;
import com.wwtech.epp.ui.activity.friend.presenter.OrganizationalStructurePresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of OrganizationalStructureActivity, provide field for OrganizationalStructureActivity
 * @date 2017/09/06 23:19:43
 */
@Module
public class OrganizationalStructureModule {
    private final OrganizationalStructureContract.View mView;


    public OrganizationalStructureModule(OrganizationalStructureContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public OrganizationalStructurePresenter provideOrganizationalStructurePresenter(HttpAPIWrapper httpAPIWrapper, OrganizationalStructureActivity mActivity) {
        return new OrganizationalStructurePresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public OrganizationalStructureActivity provideOrganizationalStructureActivity() {
        return (OrganizationalStructureActivity) mView;
    }
}